package com.ruoyi.factory.taxShare.controller;

import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.factory.taxShare.service.TaxReceiptService;
import net.sf.json.JSONObject;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import javax.servlet.http.HttpServletRequest;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;

/**
 * @ClassName TaxReceiptController
 * @Description: TODO 税务共享进项业务
 * @Author LiuJiaji
 * @Date 2023/11/22 09:45
 **/
@Controller("taxReceipt")
@ResponseBody
@EnableScheduling
@RequestMapping("/api/taxReceipt")
public class TaxReceiptController{

    @Autowired
    private TaxReceiptService taxReceiptService;

    /**
     * @author: Liujiaji
     * @date: 2023/11/24 15:16
     * @description: TODO erp采购入库单查询
     * @param: [req, request]
     * @return: com.ruoyi.common.core.domain.AjaxResult
     **/
    @PostMapping("/findPurchase")
    public AjaxResult findPurchase(@RequestBody String req, HttpServletRequest request){
        JSONObject jsonObject = JSONObject.fromObject(req);
        return taxReceiptService.findPurchase(jsonObject,request);
    }

    /**
     * @author: Liujiaji
     * @date: 2023/11/30 15:23
     * @description: TODO erp采购发票查询
     * @param: [req, request]
     * @return: com.ruoyi.common.core.domain.AjaxResult
     **/
    @PostMapping("/findPurTax")
    public AjaxResult findPurTax(@RequestBody String req, HttpServletRequest request){
        JSONObject jsonObject = JSONObject.fromObject(req);
        return taxReceiptService.findPurTax(jsonObject,request);
    }

    /**
     * TODO erp应付单查询
     * @param req
     * @param request
     * @return
     */
    @PostMapping("/findYfdTax")
    public AjaxResult findYfdTax(@RequestBody String req, HttpServletRequest request){
        JSONObject jsonObject = JSONObject.fromObject(req);
        return taxReceiptService.findYfdTax(jsonObject,request);
    }

    /**
     * @author: Liujiaji
     * @date: 2025/03/26 15:23
     * @description: TODO erp应付运费发票查询
     * @param: [req, request]
     * @return: com.ruoyi.common.core.domain.AjaxResult
     **/
    @PostMapping("/findYfyfTax")
    public AjaxResult findYfyfTax(@RequestBody String req, HttpServletRequest request){
        JSONObject jsonObject = JSONObject.fromObject(req);
        return taxReceiptService.findYfyfTax(jsonObject,request);
    }

    /**
     * @author: Liujiaji
     * @date: 2023/11/30 15:23
     * @description: TODO 采购发票维护 税务共享平台新增采购发票到erp 1.处理税务平台数据  2.将整理后的数据添加到erp
     * @param: [req, request]
     * @return: com.ruoyi.common.core.domain.AjaxResult
     **/
    @PostMapping("/addPurchaseBill")
    public AjaxResult addPurchaseBill(@RequestBody String req, HttpServletRequest request){
        JSONObject jsonObject = JSONObject.fromObject(req);
        return taxReceiptService.addPurchaseBill(jsonObject,request);
    }


    /**
     * @author: Liujiaji
     * @date: 2024/1/12 16:47
     * @description: TODO erp查询税务平台发票池发票信息
     * @param: [req, request]
     * @return: com.ruoyi.common.core.domain.AjaxResult
     **/
    @PostMapping("/findSwTax")
    public AjaxResult findSwTax(@RequestBody String req, HttpServletRequest request){
        JSONObject jsonObject = JSONObject.fromObject(req);
        return taxReceiptService.findSwTax(jsonObject,request);
    }

    /**
     * @author: Liujiaji
     * @date: 2024/1/12 16:47
     * @description: TODO erp 应付运费发票 应付单管理 提交及保存提交触发推送数据到税务平台
     * @param: [req, request]
     * @return: com.ruoyi.common.core.domain.AjaxResult
     **/
    @PostMapping("/pushSwTax")
    public AjaxResult pushSwTax(@RequestBody String req, HttpServletRequest request){
        JSONObject jsonObject = JSONObject.fromObject(req);
        return taxReceiptService.pushSwTax(jsonObject,request);
    }

    /**
     * @author: LiuJiaji
     * @date: 2025/4/11 17:01
     * @description: TODO 查询费控报销发票信息推送到税务平台 每天22点20执行
     * @param:
     * @return:
     **/
    @Scheduled(cron="0 20 22 * * ?")
    public void findCostToTaxAuto(){
        //接收日期判断日期如果为空则默认一个月,不为空则推送该日期
        Calendar instance = Calendar.getInstance();
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
        Date time1 = instance.getTime();
//        instance.add(Calendar.MONTH,-2);
        instance.add(Calendar.DATE,-2);
        Date time = instance.getTime();
        String sdate = sdf.format(time);
        String edate = sdf.format(time1);
        taxReceiptService.findCostToTax(sdate,edate);
    }

    /**
     * @author: LiuJiaji
     * @date: 2025/4/11 17:01
     * @description: TODO 查询费控报销发票信息推送到税务平台
     * @param:
     * @return:
     **/
    @PostMapping("/pushcototax")
    public AjaxResult findCostToTaxHand(@RequestBody String req, HttpServletRequest request){
        JSONObject jsonObject = JSONObject.fromObject(req);
        String sdate = jsonObject.optString("sdate");
        String edate = jsonObject.optString("edate");
        return taxReceiptService.findCostToTax(sdate,edate);
    }

    /**
     * @author: Liujiaji
     * @date: 2024/3/1 15:19
     * @description: TODO 定时任务查询采购发票中没有附件的发票
     * @param: []
     * @return: void
     **/
    public void settaxfileurl(){
        //1 获取前一天的采购发票
        //2 有附件的判断附件名称是否是发票号
        //3 不是发票号的增加附件
        //4 没有附件的增加附件
    }


//    @PostMapping("/findtest")
//    public AjaxResult findtest(HttpServletRequest request){
//        return taxReceiptService.findtest();
//    }

    @PostMapping("/findtest")
    public AjaxResult findtest(HttpServletRequest request){
        JSONObject ss = new JSONObject();
        JSONObject ss2 = new JSONObject();
        ss.put("fpdid","123456");
        ss.put("zxdfpdid","zxdfpdid");
//        ss2.put("data",ss);
        return new AjaxResult(200,"sss",ss2);
    }

    public static void main(String[] args) {
        String s ="{\"success\":true,\"data\":\"{\\\"pageid\\\":\\\"400401600_card\\\",\\\"head\\\":{\\\"card_head\\\":{\\\"areaType\\\":\\\"form\\\",\\\"rows\\\":[{\\\"values\\\":{\\\"pk_org_v\\\":{\\\"value\\\":\\\"0001A110000000002TJ9\\\"},\\\"ctrantypeid\\\":{\\\"value\\\":\\\"0001A110000000002BLW\\\"},\\\"finvoiceclass\\\":{\\\"value\\\":\\\"0\\\"},\\\"dbilldate\\\":{\\\"value\\\":\\\"2024-02-22 09:49:39\\\"},\\\"darrivedate\\\":{\\\"value\\\":\\\"2024-02-22 09:49:39\\\"},\\\"pk_supplier\\\":{\\\"value\\\":\\\"1001A110000000000X9B\\\"},\\\"pk_supplier_v\\\":{\\\"value\\\":\\\"1001A110000000000X9B\\\"},\\\"corigcurrencyid\\\":{\\\"value\\\":\\\"1002Z0100000000001K1\\\"},\\\"pk_bizpsn\\\":{\\\"value\\\":\\\"0001A11000000000QJYR\\\"},\\\"pk_dept_v\\\":{\\\"value\\\":\\\"0001A91000000006WZBD\\\"},\\\"pk_stockorg_v\\\":{\\\"value\\\":\\\"0001A110000000002TJ9\\\"},\\\"pk_paytosupplier\\\":{\\\"value\\\":\\\"1001A110000000000X9B\\\"},\\\"pk_balatype\\\":{\\\"value\\\":\\\"1001A1100000000012MS\\\"},\\\"binitial\\\":{\\\"value\\\":false},\\\"ntotalastnum\\\":{},\\\"ntotalorigmny\\\":{},\\\"vmemo\\\":{\\\"value\\\":\\\"RFXC-CG-A-202310-058\\\"},\\\"pk_org\\\":{\\\"value\\\":\\\"0001A110000000002TJA\\\"},\\\"vbillcode\\\":{},\\\"bvirtual\\\":{},\\\"bfee\\\":{},\\\"pk_freecust\\\":{},\\\"supplierphone\\\":{},\\\"pk_dept\\\":{\\\"value\\\":\\\"1001A110000000002RCB\\\"},\\\"pk_stockorg\\\":{\\\"value\\\":\\\"0001A110000000002TJA\\\"},\\\"ts\\\":{},\\\"dmakedate\\\":{},\\\"creator\\\":{\\\"value\\\":\\\"1001A1100000000A3PBI\\\"},\\\"approver\\\":{},\\\"vtrantypecode\\\":{\\\"value\\\":\\\"25-01\\\"},\\\"taudittime\\\":{},\\\"creationtime\\\":{\\\"value\\\":\\\"2024-02-22 09:49:39\\\"},\\\"pk_frozenuser\\\":{},\\\"modifier\\\":{},\\\"tfrozentime\\\":{},\\\"modifiedtime\\\":{},\\\"pk_bankaccbas\\\":{},\\\"vbankaccount\\\":{},\\\"ccurrencyid\\\":{\\\"value\\\":\\\"1002Z0100000000001K1\\\"},\\\"nexchangerate\\\":{\\\"value\\\":\\\"1.00\\\"},\\\"vfrozenreason\\\":{},\\\"bfrozen\\\":{},\\\"pk_busitype\\\":{\\\"value\\\":\\\"1001A110000000002LBB\\\"},\\\"pk_purchaseorg\\\":{\\\"value\\\":\\\"0001A110000000002TJA\\\"},\\\"pk_purchaseorg_v\\\":{\\\"value\\\":\\\"0001A110000000002TJ9\\\"},\\\"pk_payterm\\\":{},\\\"ftaxtypeflagh\\\":{\\\"value\\\":\\\"1\\\"},\\\"ntaxrateh\\\":{\\\"value\\\":\\\"13.00\\\"},\\\"vparentcode\\\":{},\\\"pk_parentinvoice\\\":{},\\\"ngroupexchgrate\\\":{\\\"value\\\":\\\"1.00\\\"},\\\"nglobalexchgrate\\\":{\\\"value\\\":\\\"1.00\\\"},\\\"vdef1\\\":{\\\"value\\\":\\\"\\\"},\\\"vdef2\\\":{},\\\"vdef3\\\":{},\\\"vdef4\\\":{},\\\"vdef5\\\":{},\\\"vdef6\\\":{},\\\"vdef7\\\":{},\\\"vdef8\\\":{},\\\"vdef9\\\":{},\\\"vdef10\\\":{\\\"value\\\":\\\"\\\"},\\\"vdef11\\\":{},\\\"vdef12\\\":{},\\\"vdef13\\\":{},\\\"vdef14\\\":{},\\\"vdef15\\\":{},\\\"vdef16\\\":{},\\\"vdef17\\\":{},\\\"vdef18\\\":{},\\\"vdef19\\\":{},\\\"vdef20\\\":{},\\\"bapflag\\\":{},\\\"pk_invoice\\\":{},\\\"fbillstatus\\\":{\\\"value\\\":\\\"0\\\"},\\\"pk_group\\\":{\\\"value\\\":\\\"0001A110000000000C8B\\\"},\\\"iprintcount\\\":{\\\"value\\\":\\\"0\\\"},\\\"csendcountryid\\\":{\\\"value\\\":\\\"0001Z010000000079UJJ\\\"},\\\"crececountryid\\\":{\\\"value\\\":\\\"0001Z010000000079UJJ\\\"},\\\"ctaxcountryid\\\":{\\\"value\\\":\\\"0001Z010000000079UJJ\\\"},\\\"fbuysellflag\\\":{\\\"value\\\":\\\"2\\\"},\\\"btriatradeflag\\\":{\\\"value\\\":false},\\\"ctradewordid\\\":{\\\"value\\\":\\\"\\\"},\\\"bopptaxflag\\\":{\\\"value\\\":false},\\\"vvatcode\\\":{},\\\"vvendorvatcode\\\":{},\\\"finvoicetype\\\":{\\\"value\\\":\\\"0\\\"},\\\"saga_frozen\\\":{},\\\"saga_gtxid\\\":{},\\\"saga_btxid\\\":{},\\\"saga_status\\\":{},\\\"cextsrcsys\\\":{},\\\"billmaker\\\":{\\\"value\\\":\\\"1001A1100000000A3PBI\\\"},\\\"fratecategory\\\":{},\\\"vextsrcbillcode\\\":{},\\\"dratedate\\\":{},\\\"pseudocolumn\\\":{},\\\"vdef21\\\":{},\\\"vdef22\\\":{},\\\"vdef27\\\":{},\\\"vdef28\\\":{},\\\"vdef29\\\":{},\\\"vdef23\\\":{},\\\"vdef24\\\":{},\\\"vdef25\\\":{},\\\"vdef26\\\":{},\\\"vdef30\\\":{},\\\"vdef31\\\":{},\\\"vdef32\\\":{},\\\"vdef33\\\":{},\\\"vadjustreason\\\":{},\\\"vdef38\\\":{},\\\"vdef39\\\":{},\\\"vdef34\\\":{},\\\"vdef35\\\":{},\\\"vdef36\\\":{},\\\"vdef37\\\":{},\\\"vdef41\\\":{},\\\"vdef42\\\":{},\\\"vdef43\\\":{},\\\"vdef44\\\":{},\\\"vdef40\\\":{},\\\"dr\\\":{},\\\"vdef49\\\":{},\\\"vdef45\\\":{},\\\"vdef46\\\":{},\\\"vdef47\\\":{},\\\"vdef48\\\":{},\\\"vdef50\\\":{},\\\"csaleinvoiceid\\\":{},\\\"pk_paytosupplier_v\\\":{\\\"value\\\":\\\"1001A110000000000X9B\\\"},\\\"cratetype\\\":{}},\\\"status\\\":\\\"1\\\"}],\\\"areacode\\\":\\\"card_head\\\"}},\\\"body\\\":{\\\"card_body\\\":{\\\"areaType\\\":\\\"table\\\",\\\"rows\\\":[{\\\"status\\\":\\\"2\\\",\\\"isOptimized\\\":false,\\\"values\\\":{\\\"cfirstbid\\\":{\\\"value\\\":\\\"1001ZZ100000001TVAJ6\\\"},\\\"naccumsettorigmny\\\":{},\\\"nnosubtax\\\":{\\\"value\\\":\\\"0.00\\\"},\\\"nastprice\\\":{\\\"value\\\":\\\"14.070796\\\"},\\\"pk_material.name\\\":{\\\"value\\\":\\\"聚异丁烯（1000型）\\\"},\\\"cextsrcbid\\\":{},\\\"vextsrcbillcode\\\":{},\\\"vordercode\\\":{\\\"value\\\":\\\"CD2401090001\\\"},\\\"norigtaxprice\\\":{\\\"value\\\":\\\"15.900000\\\"},\\\"vbdef45\\\":{},\\\"ngroupmny\\\":{\\\"value\\\":\\\"408053.10\\\"},\\\"vbdef46\\\":{},\\\"pk_material\\\":{\\\"value\\\":\\\"1001A1100000000005XW\\\"},\\\"vbdef43\\\":{},\\\"casscustid\\\":{},\\\"nnumwrbck\\\":{},\\\"vbdef44\\\":{},\\\"csourcetypecode\\\":{\\\"value\\\":\\\"45\\\"},\\\"vbdef49\\\":{},\\\"vbdef47\\\":{},\\\"vbdef48\\\":{},\\\"vbdef41\\\":{},\\\"vbdef42\\\":{},\\\"vbdef40\\\":{},\\\"naccumsettmny\\\":{},\\\"ftaxtypeflag\\\":{\\\"value\\\":\\\"1\\\"},\\\"vfree10\\\":{},\\\"pk_order\\\":{\\\"value\\\":\\\"1001ZZ100000001TVAJ5\\\"},\\\"pseudocolumn\\\":{\\\"value\\\":\\\"0\\\"},\\\"vfirstcode\\\":{\\\"value\\\":\\\"CD2401090001\\\"},\\\"castunitid\\\":{\\\"value\\\":\\\"1001A1100000000005GQ\\\"},\\\"pk_apfinanceorg_v\\\":{\\\"value\\\":\\\"0001A110000000002TJ9\\\"},\\\"cunitid\\\":{\\\"value\\\":\\\"1001A1100000000005GQ\\\"},\\\"cfirsttypecode\\\":{\\\"value\\\":\\\"21\\\"},\\\"ntaxmny\\\":{\\\"value\\\":\\\"461100.00\\\"},\\\"pk_order_b\\\":{\\\"value\\\":\\\"1001ZZ100000001TVAJ6\\\"},\\\"vordertrantype\\\":{\\\"value\\\":\\\"1001A110000000002KOR\\\"},\\\"vmemob\\\":{},\\\"ntaxprice\\\":{\\\"value\\\":\\\"15.900000\\\"},\\\"vbdef50\\\":{},\\\"cextsrcbilltype\\\":{},\\\"vsourcerowno\\\":{\\\"value\\\":\\\"10\\\"},\\\"firstts\\\":{},\\\"nastnum\\\":{\\\"value\\\":\\\"29000.00000\\\"},\\\"ntax\\\":{\\\"value\\\":\\\"53046.90\\\"},\\\"vsourcecode\\\":{\\\"value\\\":\\\"rf282401090001\\\"},\\\"dbilldate\\\":{},\\\"cextsrcid\\\":{},\\\"csourceid\\\":{\\\"value\\\":\\\"1001ZZ100000001TVALK\\\"},\\\"nnosubtaxrate\\\":{\\\"value\\\":\\\"0.00\\\"},\\\"cffileid\\\":{},\\\"ccontractrowid\\\":{},\\\"nglobalmny\\\":{\\\"value\\\":\\\"408053.10\\\"},\\\"nnum\\\":{\\\"value\\\":\\\"29000.00000\\\"},\\\"pk_invoice_b\\\":{},\\\"pk_material.materialspec\\\":{\\\"value\\\":\\\"罐装\\\"},\\\"vbdef9\\\":{},\\\"cfirstid\\\":{\\\"value\\\":\\\"1001ZZ100000001TVAJ5\\\"},\\\"vctcode\\\":{},\\\"nglobaltaxmny\\\":{\\\"value\\\":\\\"461100.00\\\"},\\\"ts\\\":{},\\\"pk_group\\\":{\\\"value\\\":\\\"0001A110000000000C8B\\\"},\\\"casscustvid\\\":{},\\\"frowtype\\\":{\\\"value\\\":\\\"0\\\"},\\\"pk_apliabcenter\\\":{},\\\"cadjustedrowid\\\":{},\\\"firstbts\\\":{},\\\"pk_usedept\\\":{},\\\"pk_stordoc\\\":{\\\"value\\\":\\\"1001A9100000001L10CE\\\"},\\\"dr\\\":{},\\\"nsourcenum\\\":{\\\"value\\\":\\\"29000.00000\\\"},\\\"nprice\\\":{\\\"value\\\":\\\"14.070796\\\"},\\\"pk_org\\\":{\\\"value\\\":\\\"0001A110000000002TJA\\\"},\\\"vbdef8\\\":{},\\\"pk_supplier\\\":{},\\\"vbdef7\\\":{},\\\"vbdef6\\\":{},\\\"naccumsettnum\\\":{},\\\"vbdef5\\\":{},\\\"vbdef4\\\":{},\\\"vbdef3\\\":{},\\\"vbdef2\\\":{},\\\"vbdef1\\\":{},\\\"cprojecttaskid\\\":{},\\\"nreasonwastenum\\\":{},\\\"ngrouptaxmny\\\":{\\\"value\\\":\\\"461100.00\\\"},\\\"vfree1\\\":{},\\\"sourcebts\\\":{\\\"value\\\":\\\"2024-01-09 09:21:51\\\"},\\\"vfirsttrantype\\\":{\\\"value\\\":\\\"1001A110000000002KOR\\\"},\\\"pk_apfinanceorg\\\":{\\\"value\\\":\\\"0001A110000000002TJA\\\"},\\\"pk_order_payplan\\\":{},\\\"vsourcetrantype\\\":{\\\"value\\\":\\\"1001A110000000002L2G\\\"},\\\"dsourcedate\\\":{\\\"value\\\":\\\"2024-01-09 09:21:02\\\"},\\\"vbdef12\\\":{},\\\"pk_supplier_v\\\":{},\\\"vbdef13\\\":{},\\\"vbdef10\\\":{},\\\"vbdef11\\\":{},\\\"nasttaxprice\\\":{\\\"value\\\":\\\"15.900000\\\"},\\\"pk_srcmaterial\\\":{\\\"value\\\":\\\"1001A1100000000005XW\\\"},\\\"vbdef16\\\":{},\\\"vbdef17\\\":{},\\\"vbdef14\\\":{},\\\"ntaxrate\\\":{\\\"value\\\":\\\"13.00\\\"},\\\"vbdef15\\\":{},\\\"vfree8\\\":{},\\\"vfree9\\\":{},\\\"vfree6\\\":{},\\\"pk_org_v\\\":{\\\"value\\\":\\\"0001A110000000002TJ9\\\"},\\\"vfree7\\\":{},\\\"cproductorid\\\":{},\\\"vfree4\\\":{},\\\"nadjustorgprice\\\":{},\\\"vfree5\\\":{},\\\"vfree2\\\":{},\\\"vfirstrowno\\\":{\\\"value\\\":\\\"10\\\"},\\\"vfree3\\\":{},\\\"pk_order_payplan_b_ts\\\":{},\\\"pk_usedept_v\\\":{},\\\"cqualitylevelid\\\":{},\\\"norigtaxmny\\\":{\\\"value\\\":\\\"461100.00\\\"},\\\"pk_invoice\\\":{},\\\"pk_stockps_b\\\":{},\\\"vbdef18\\\":{},\\\"vbdef19\\\":{},\\\"sourcets\\\":{\\\"value\\\":\\\"2024-01-09 09:21:54\\\"},\\\"vbdef23\\\":{},\\\"ctaxcodeid\\\":{\\\"value\\\":\\\"1002Z01000000001CNE2\\\"},\\\"vbdef24\\\":{},\\\"nastorigtaxprice\\\":{\\\"value\\\":\\\"15.900000\\\"},\\\"vbdef21\\\":{},\\\"vbdef22\\\":{},\\\"csourcebid\\\":{\\\"value\\\":\\\"1001ZZ100000001TVALL\\\"},\\\"vbdef27\\\":{},\\\"pk_apliabcenter_v\\\":{},\\\"vbdef28\\\":{},\\\"cadjustedinvid\\\":{},\\\"vbdef25\\\":{},\\\"vbdef26\\\":{},\\\"pk_costsubj\\\":{},\\\"pk_batchcode\\\":{\\\"value\\\":\\\"1001ZZ100000001TVALI\\\"},\\\"nplanprice\\\":{},\\\"vbdef20\\\":{},\\\"naccumnosubmny\\\":{},\\\"pk_order_payplan_ts\\\":{},\\\"cprojectid\\\":{},\\\"vchangerate\\\":{\\\"value\\\":\\\"1/1\\\"},\\\"pk_material.materialtype\\\":{},\\\"vbdef29\\\":{},\\\"norigprice\\\":{\\\"value\\\":\\\"14.070796\\\"},\\\"vbdef34\\\":{},\\\"vbdef35\\\":{},\\\"crowno\\\":{\\\"value\\\":\\\"10\\\"},\\\"vbdef32\\\":{},\\\"vbdef33\\\":{},\\\"ncaltaxmny\\\":{\\\"value\\\":\\\"408053.10\\\"},\\\"pk_order_payplan_b\\\":{},\\\"vbdef38\\\":{},\\\"vbdef39\\\":{},\\\"ccontractid\\\":{},\\\"vbdef36\\\":{},\\\"nastorigprice\\\":{\\\"value\\\":\\\"14.070796\\\"},\\\"vbdef37\\\":{},\\\"vbatchcode\\\":{\\\"value\\\":\\\"20231207\\\"},\\\"nmny\\\":{\\\"value\\\":\\\"408053.10\\\"},\\\"norigmny\\\":{\\\"value\\\":\\\"408053.10\\\"},\\\"vbdef30\\\":{},\\\"ncalcostmny\\\":{\\\"value\\\":\\\"408053.10\\\"},\\\"vadjedbillcode\\\":{},\\\"vbdef31\\\":{},\\\"opr\\\":{},\\\"numberindex\\\":{\\\"value\\\":\\\"1\\\"}},\\\"key\\\":\\\"801170.2410813a24aa2147\\\",\\\"rowId\\\":\\\"801170.2410813a24aa2147\\\",\\\"rowid\\\":\\\"801170.2410813a24aa2147\\\",\\\"pid\\\":\\\"root\\\",\\\"isLeaf\\\":true,\\\"depth\\\":0,\\\"path\\\":[\\\"801170.2410813a24aa2147\\\"],\\\"height\\\":0,\\\"dataIndex\\\":0,\\\"leafIndex\\\":0,\\\"range\\\":[0,1],\\\"viewIndex\\\":0,\\\"selected\\\":false}],\\\"areacode\\\":\\\"card_body\\\"}},\\\"templetid\\\":\\\"1001A110000000002VWX\\\",\\\"skipCodes\\\":[]}\",\"code\":\"1000000000\",\"message\":null,\"errorStack\":null}\n";
        System.out.println(s);
        JSONObject jsonObject = JSONObject.fromObject(s);
        System.out.println(jsonObject);
        String jsonObject1 = jsonObject.optString("data");
        System.out.println(jsonObject1);
    }



}
